<include file="Public/ace_header" />
<style type="text/css">
.find-input-div {
    margin-bottom: 10px;
}
</style>
<div class="row">
    <div class="col-xs-12">
        <div class="row hidden-480 find">
            <!-- 查询块 -->
            <form id="find-form">
                <div class="col-md-3 find-input-div">
                    <input type="text" class="col-md-12 search-input" name="number" id="number" value="{$_GET[number]}" placeholder="学生编号" />
                </div>
                <div class="col-md-3 find-input-div">
                    <input type="text" class="col-md-12 search-input" name="name" id="name" value="{$_GET[name]}" placeholder="学生姓名" />
                </div>
                <div class="col-md-3 find-input-div">
                    <input type="text" class="col-md-12 search-input" name="identity" id="identity" value="{$_GET[identity]}" placeholder="身份证号" />
                </div>
                <div class="col-md-3 find-input-div">
                    <select name="state" id="state" class="width-100 search-input">
                        <option value="">学生情况</option>
                        <option value="正常" <if condition="$_GET['state'] eq '正常'"> selected </if>>正常</option>
                        <option value="休学" <if condition="$_GET['state'] eq '休学'"> selected </if>>休学</option>
                        <option value="退学" <if condition="$_GET['state'] eq '退学'"> selected </if>>退学</option>
                        <option value="转学" <if condition="$_GET['state'] eq '转学'"> selected </if>>转学</option>
                    </select>
                </div>
                <div class="col-md-3 col-md-offset-9 center find-input-div">
                    <button type="submit" class="btn btn-success btn-xs">查询</button>
                    <button class="btn btn-warning btn-xs" type="button" href="#" onclick="clearFind()">清空</button>
                  <a class="btn btn-pink btn-xs" id="export-btn" href="__CONTROLLER__/QuitO" onclick="return exportExcel()">导出</a>
              <!--      <a class="btn btn-purple btn-xs" href="__CONTROLLER__/Import">导入</a> -->
                </div>
            </form>
        </div>
        <div class="table-responsive">
            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th class="center">
                            <label>
                                <input type="checkbox" class="ace" id="checkall" />
                                <span class="lbl"></span>
                            </label>
                        </th>
                        <th class="center">学生编号</th>
                        <th class="center">学生</th>
                        <th class="center">身份证号</th>
                        <th class="center">状态</th>
                        <th class="center">应交学费</th>
                        <th class="center">实交学费</th>
                        <th class="center">退还学费</th>
                        <th class="center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="list" id="vo">
                        <tr>
                            <td class="center">
                                <label>
                                    <input type="checkbox" class="ace" name="chkid" value="{$vo['id']}" />
                                    <span class="lbl"></span>
                                </label>
                            </td>
                            <td class="center">{$vo['fee']['number']}</td>
                            <td class="center">{$vo['fee']['name']}</td>
                            <td class="center">{$vo['fee']['identity']}</td>
                            <td class="center">{$vo['fee']['state']}</td>
                            <php>$tuition=D('tuition')->where(['id'=>$vo['tuition_id']])->find();
                            </php>
                               <php>$shouldModel=D('should')->where(['tuition_id'=>$vo['tuition_id'],'student_id'=>$vo['student_id']])->find();
                            </php>
                            <if condition="$shouldModel">
                            <td class="center">{$shouldModel['should']-$vo['quit']}</td>
                            <else/>
                            <td class="center">{$tuition['money']-$vo['quit']}</td>
                            </if>
                            <td class="center">{$vo['over']-$vo['quit']}</td>
                            <td class="center">{$vo['quit']}</td>
                            <td class="center">
                                <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                    <a href="__CONTROLLER__/QuitU/id/{$vo["id"]}">
                                        <button class="btn btn-xs btn-info" style="border: 1px;">
                                            退费
                                        </button>
                                    </a>
                                </div>
                                <div class="visible-xs visible-sm hidden-md hidden-lg">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-cog icon-only bigger-110"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="__CONTROLLER__/QuitU/id/{$vo["id"]}" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                    <span class="green">
                                                        <i class="icon-edit bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a class="delete-btn" id="{$vo['id']}">
                                                    <span class="red">
                                                        <i class="icon-trash bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
            {$page}
        </div>
        <!-- /.table-responsive -->
    </div>
    <!-- /span -->
</div>
<!-- /row -->
<include file="Public/ace_footer" />